package me.firstapp.service.system;

import java.util.Date;
import java.util.Map;

import me.firstapp.common.utils.Page;
import me.firstapp.module.system.ApiClientRecord;

public interface ApiClientRecordService {

	/**
	 * 新增api客户数据统计
	 * 
	 * @param apiClientId
	 * @param dateTime
	 * @param counts
	 * @return
	 */
	ApiClientRecord addApiClientRecord(Long apiClientId, Long dateTime, Long counts);

	/**
	 * 分页查询api客户数据统计
	 * 
	 * @param apiClientId
	 * @param pageNo
	 * @param pageSize
	 * @param searchParams
	 * @param sortParam
	 * @param sortType
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	Page<ApiClientRecord> findApiClientRecordPage(Long apiClientId, Integer pageNo, Integer pageSize,
			Map<String, Object> searchParams, String sortParam, String sortType, Date startTime, Date endTime);

	/**
	 * 计算api客户访问总次数
	 * 
	 * @param apiClientId
	 * @return
	 */
	Long findApiClientRecordTotalTimes(Long apiClientId);

	/**
	 * 计算api客户平均访问次数
	 * 
	 * @param apiClientId
	 * @return
	 */
	Long findApiClientRecordMeanTimes(Long apiClientId);
}
